home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / OUI / include / rcs / locale.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.8 KB  |  102 lines

  1. head    1.2;
  2. access;
  3. symbols;
  4. locks
  5.     dlorre:1.2; strict;
  6. comment    @ * @;
  7.  
  8.  
  9. 1.2
  10. date    97.07.14.04.24.43;    author dlorre;    state Exp;
  11. branches;
  12. next    1.1;
  13.  
  14. 1.1
  15. date    96.08.22.02.05.49;    author dlorre;    state Exp;
  16. branches;
  17. next    ;
  18.  
  19.  
  20. desc
  21. @Oui.lib -- Object User Interface
  22. Projet créé en 1994
  23. Auteur: Dominique Lorre
  24. @
  25.  
  26.  
  27. 1.2
  28. log
  29. @now is catcomp compatible
  30. new cast functions
  31. @
  32. text
  33. @// $Id$
  34. #ifndef CLASS_LOCALE_H
  35. #define CLASS_LOCALE_H 1
  36.  
  37. #include <exec/types.h>
  38. #include <libraries/locale.h>
  39.  
  40.  
  41. #ifdef LOCALISE
  42. #define NPARMS(a, b, c, d) (a, b, c, d)
  43. #define LPARMS(a, b, c) (a, b, c)
  44. #define OPARMS(a, b, c) (a, b, "MSG_UNDEF", c)
  45. #define DPARMS(a, b) (a, b, "MSG_UNDEF")
  46. #else
  47. #define NPARMS(a, b, c, d) (a, b, d)
  48. #define LPARMS(a, b, c) (a, b)
  49. #define OPARMS(a, b, c) (a, b, c)
  50. #define DPARMS(a, b) (a, b)
  51. #endif
  52.  
  53. class catalog
  54. {
  55. friend class lstring ;
  56.     Catalog *cat ;
  57.     int locnum ;
  58. public:
  59. #if defined( LOCALISE )
  60.     char catname[80] ;
  61.     char langname[80] ;
  62. #endif
  63.     catalog(char *name, char *deflang, char *lang) ;
  64.     ~catalog() ;
  65. } ;
  66.  
  67. class lstring               // Classe de l'application
  68. {
  69. friend class catalog ;
  70. public:
  71.     char *string ;
  72. #ifdef LOCALISE
  73.     lstring(catalog *lc, char *def, char *desc, int id=-1) ;
  74. #else
  75.     lstring(catalog *lc, char *def, int id=-1) ;
  76. #endif
  77.     // Implicit conversion
  78.     operator const char *() const { return (const char *)string ; }
  79.     operator const UBYTE *() const { return (const UBYTE *)string ; }
  80.  
  81.     // Explicit conversion (used with system functions not declaring const)
  82.     char* charptr() const { return string ; }
  83.     UBYTE* ubyteptr() const { return (UBYTE *)string ; }
  84. } ;
  85. #endif@
  86.  
  87.  
  88. 1.1
  89. log
  90. @Initial revision
  91. @
  92. text
  93. @d1 1
  94. d8 13
  95. d27 4
  96. d40 12
  97. a51 3
  98.     lstring(catalog *lc, char *def, int id) ;
  99.     lstring(catalog *lc, char *def) ;
  100.     operator char *() { return string ; }
  101. @
  102.